// 公用下拉框
import { orgApis } from '@/api/vesalesapi'
const ModelOptions = (isMust = false, span = 6, isRequire = false) => [
  {
    compKey: 'carSeries',
    labelName: '车系名称：',
    codeField: 'carSeriesId',
    textField: 'carSeriesCn',
    oFields: 'carSeriesId,carSeriesCn',
    customObj: { api: orgApis.listOfCarSeries, selectType: '1' },
    component: () => import('@/components/org/commonSelect'),
    isRequire,
    isMust,
    span
  },
  {
    compKey: 'carConfig',
    labelName: '基础车型名称：',
    codeField: 'carConfigId',
    textField: 'carConfigCn',
    component: () => import('@/components/org/commonSelect'),
    oFields: 'carConfigId,carConfigCn',
    parentFileds: 'value:carSeriesId',
    customObj: {
      listQuery: { carSeriesId: '' },
      api: orgApis.listOfCarModel, selectType: '1'
    },
    isRequire,
    isMust,
    span
  },
  {
    compKey: 'optionalPag',
    labelName: '选装包：',
    codeField: 'optionalPagId',
    textField: 'optionalPagName',
    component: () => import('@/components/org/commonSelect'),
    parentFileds: 'value:carConfigId|carSeriesId',
    oFields: 'optionalPagId,optionalPagName',
    customObj: {
      listQuery: {
        carConfigId: '', carSeriesId: ''
      },
      api: orgApis.listOfPackage, selectType: '1'
    },
    type: 'inputText',
    isRequire,
    isMust,
    span
  },
  {
    compKey: 'carColor',
    labelName: '车身颜色：',
    codeField: 'carColorId',
    textField: 'carColorName',
    component: () => import('@/components/org/commonSelect'),
    parentFileds: 'value:carConfigId|carSeriesId|optionalPagId',
    oFields: 'carColorId,carColorName',
    customObj: {
      listQuery: {
        carConfigId: '', carSeriesId: '', optionalPagId: ''
      },
      api: orgApis.listOfCarColor, selectType: '1'
    },
    type: 'inputText',
    isRequire,
    isMust,
    span
  },
  {
    compKey: 'carIncolor',
    labelName: '内饰颜色：',
    codeField: 'carIncolorId',
    textField: 'carIncolorName',
    component: () => import('@/components/org/commonSelect'),
    parentFileds: 'value:carConfigId|carSeriesId|optionalPagId',
    oFields: 'carIncolorId,carIncolorName',
    customObj: {
      listQuery: {
        carConfigId: '', carSeriesId: '', optionalPagId: ''
      },
      api: orgApis.listOfCarInterior, selectType: '1'
    },
    type: 'inputText',
    isRequire,
    isMust,
    span
  }
]
export default {
  ModelOptions
}
